package com.slz3.business.module.orderManagement.ordPayDetail.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.orderManagement.ordPayDetail.domain.OrdPayDetail;
import com.slz3.business.module.orderManagement.ordPayDetail.domain.OrdPayDetailCondition;
import org.springframework.stereotype.Controller;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Controller
public class OrdPayDetailResController extends OrdPayDetailResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, OrdPayDetail ordPayDetail) {
        if (OrdPayDetailResUnsafeValid.add(req, ordPayDetail)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$OrdPayDetailUpdateLock(req, ordPayDetail);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        if (OrdPayDetailResUnsafeValid.delete(req, ordPayDetailCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$OrdPayDetailUpdateLock(req, ordPayDetailCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, OrdPayDetail ordPayDetail) {
        if (OrdPayDetailResUnsafeValid.modify(req, ordPayDetail)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$OrdPayDetailUpdateLock(req, ordPayDetail);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (OrdPayDetailResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return ordPayDetailResAtomic.info_$OrdPayDetailUpdateLock(req);
        if (OrdPayDetailResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$OrdPayDetailUpdateLock(req);
        }
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (OrdPayDetailResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        //
        if (OrdPayDetailResUnsafeValid.auditSubmit(req, ordPayDetailCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$OrdPayDetailUpdateLock(req, ordPayDetailCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        if (OrdPayDetailResUnsafeValid.audit(req, ordPayDetailCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$OrdPayDetailUpdateLock(req, ordPayDetailCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        if (OrdPayDetailResUnsafeValid.auditReject(req, ordPayDetailCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$OrdPayDetailUpdateLock(req, ordPayDetailCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        if (OrdPayDetailResUnsafeValid.usingEnable(req, ordPayDetailCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$OrdPayDetailUpdateLock(req, ordPayDetailCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, OrdPayDetailCondition ordPayDetailCondition) {
        if (OrdPayDetailResUnsafeValid.usingDisable(req, ordPayDetailCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$OrdPayDetailUpdateLock(req, ordPayDetailCondition);
        }
    }

}
